import Request from '@/components/pocky-request/index.js'

const apiUrl = {
	getSupGoodsList: '/supplier/getSupplierGoodsByCat',
	getNewGoodsList: '/supplier/getSupplierWapNewGoodsList',
	getGoodsDetail: '/supplier/index',
	getGoodsContent: '/supplier/get_goods_content',
	getGoodsListPage: '/supplier/getSearchGoodsPageList',
	getCategoryGoodsListPage: '/supplier/getCategoryGoodsPageList',
}


/**
 * 获取分类下的商品列表 
 * @param {Object} parameter
 */
export function getSupGoodsList(params) {
	return Request().request({
	  url: apiUrl.getSupGoodsList,
	  method: 'POST',
	  data: params
	})
}

/**
 * 获取分类下的商品列表 
 * @param {Object} parameter
 */
export function getGoodsListPage(params) {
	return Request().request({
	  url: apiUrl.getGoodsListPage,
	  method: 'POST',
	  data: params
	})
}

/**
 * 获取分类下的商品列表 
 * @param {Object} parameter
 */
export function getNewGoodsList(params) {
	return Request().request({
	  url: apiUrl.getNewGoodsList,
	  method: 'POST',
	  data: params
	})
}

/**
 * 获取分类下的商品列表 
 * @param {Object} parameter
 */
export function getGoodsDetail(params) {
	return Request().request({
	  url: apiUrl.getGoodsDetail,
	  method: 'POST',
	  data: params
	})
}

/**
 * 获取分类下的商品列表 
 * @param {Object} parameter
 */
export function getGoodsContent(params) {
	return Request().request({
	  url: apiUrl.getGoodsContent,
	  method: 'POST',
	  data: params
	})
}

/**
 * 获取分类下的商品列表 
 * @param {Object} parameter
 */
export function getCategoryGoodsListPage(params) {
	return Request().request({
	  url: apiUrl.getCategoryGoodsListPage,
	  method: 'POST',
	  data: params
	})
}


